<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="/tld/dictionary" prefix="dictionary"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link rel="stylesheet" type="text/css" href="${ctx}/static/css/thickbox.css" />
<link rel="stylesheet" href="${ctx}/static/css/style.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/style1.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/kongjian.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/jquery.ui.all.css" />
<script src="${ctx}/static/script/jquery-1.4.min.js" type="text/javascript"></script>
<script src="${ctx}/static/script/jquery.ui.core.js"></script>
<script type="text/javascript" src="${ctx}/static/thickbox.js"></script>
<script src="${ctx}/static/script/jquery.ui.datepicker.js"></script>
<title>订购</title>
<script language="javascript">
//订购提交操作
function submit_(){
	var thisform = document.getElementById('mainForm');
	thisform.action='${ctx}/order/execOrder';
	thisform.submit();
}
</script>
</head>

<body>
<form:form id="mainForm" action="${ctx}/recommend/recommend_order" modelAttribute="recommendInfoForm" method="post">
<input type="hidden" name="pageNo" id="pageNo" value="${page.pageNo}"/>
<input type="hidden" name="orderId" id="orderId" value="${recommendInfoForm.orderId}"/>
<div class="er_banner">订购</div>
<p style="padding-left:16px;"><a href="#" onclick="javascript:submit_();" style="border:1px solid #3b97e4; background:#fff; display:block; width:80px; height:20px; line-height:20px; background:#c6defa; color:#000; float:left; margin-top:10px;">订购</a></p>

<div class="yiban">
	<table style="width:100%;" class="ggkj_table"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th scope="col">序号</th>
    <th scope="col">债权编号</th>
    <th scope="col">债务人</th>
    <th scope="col">债务本金</th>
    <th scope="col">irr</th>
    <th scope="col">推荐分配金额</th>
    <th scope="col">支持对价金额</th>
    <th scope="col">推荐比例</th>
	<th scope="col">还款日</th>
  </tr>
	<c:forEach items="${page.result}" var="item" varStatus="stauts">
		<c:choose>
  			<c:when test="${stauts.count%2==0}">
  				<tr class="ggkj_tdColr">
  			</c:when>
  			<c:otherwise>
  				<tr >
  			</c:otherwise>
		</c:choose>
			  <td>${stauts.count+(page.pageNo-1)*10}</td>
			  <td>${item.loanId}</td>
			  <td>${item.loanInfo.customer.name}</td>
			  <td><fmt:formatNumber value="${item.loanInfo.loanAMt}" pattern="##,###.##" /></td>
			  <td>${item.loanInfo.irr}</td>
			  <td><fmt:formatNumber value="${item.amt}" pattern="##,###.##"/></td>
			  <td><fmt:formatNumber value="${item.amt}" pattern="##,###.##"/></td>
			  <td><fmt:formatNumber value="${item.scale}" pattern="#0.000#" /></td>
			  <td><dictionary:display code="${item.ftOrderMain.investInfo.loanReturnDate}"/></td>
			  </tr>
		  </tr>
	</c:forEach>
</table>
	
</div>
<div class="ggkj_pagecontainer">
  <div class="ggkj_pageBGleft">
    	<span class="ggkj_pageBGright"></span>
    	<a href="javascript:jumpPage(1)" class="ggkj_pageUpa">
        
        </a>
        <a href="javascript:jumpPage(${page.prePage})" class="ggkj_pageUp">
        
        </a>
        <span class="ggkj_insertline"></span>
        <span class="ggkj_pageSpan">
        	页<input type="text" id="pageNo" name="pageNo" class="ggkj_inputtext_30" value="${page.pageNo}">OF ${page.totalPages}
        </span>
        <span class="ggkj_insertline"></span>
        <a href="javascript:jumpPage(${page.nextPage})" class="ggkj_pageDown">
        
        </a>
        <a href="javascript:jumpPage(${page.totalPages})" class="ggkj_pageDowna">
        
        </a>
        <span class="ggkj_insertline"></span>
        
    </div>
</div>
<script language="JavaScript">
	function jumpPage(pageNo) {
		document.getElementById('pageNo').value=pageNo;
		document.getElementById('mainForm').submit();
	}
</script>
<script language="JavaScript">
  function OpenMatchWindow()
  {
   	window.showModalDialog("${ctx}/fortune/transmatch",window,"dialogWidth:400px;status:no;dialogHeight:250px"); 
  }
</script>
<script language="JavaScript">
	$(function() {
		$(".date-pick" ).datepicker({
	      dateFormat:'yy-mm-dd',
	      selectOtherMonths:true,
	      changeYear: true
  		});
	});
</script>



</body>
</form:form>
</body>
</html>
